const { defineConfig } = require('@vue/cli-service')
const mock = require('./mock')
module.exports = defineConfig({
  // transpileDependencies: true,
  lintOnSave: false,
  devServer: {
    host: 'localhost',
    port: '8080',
    proxy: {
      '/api': {
        target: 'http://sph-h5-api.atguigu.cn',
      },
    },
    // 设置mock
    onBeforeSetupMiddleware(devServer) {
      // app应用对象
      const app = devServer.app
      mock(app)
    },
  },
})
